﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace View
{
    public partial class CustomerDetails : Form
    {
        private Menu menu;
        private string phone;

        public CustomerDetails(string phone, Menu menu)
        {
            this.menu = menu;
            this.phone = phone;
            InitializeComponent();
            this.label1.Text = phone;
        }

        private void button4_Click(object sender, EventArgs e)
        {
            menu.Show();
            this.Dispose();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Controller.Customer customer = new Controller.Customer(phone);
            customer.addMe(textBox1.Text, textBox2.Text, checkBox1.Checked);
            Orders x = new Orders(menu, customer.getMyPhone(),customer.getMyName());
            x.Show();
            this.Dispose();
        }

    }
}
